﻿//***********************************************************************
// Assembly         : IGolovkine.AoA.Core
// Author           : Ilia
// Created          : 06-11-2011
//
// Last Modified By : Ilia
// Last Modified On : 01-07-2010
// Description      : 
//
// Copyright        : (c) Microsoft. All rights reserved.
//***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IGolovkine.AoA.Diagnostics
{
    /// <summary>
    /// 
    /// </summary>
    /// <remarks></remarks>
    internal class NLoggerWrapper : ILogger
    {
        /// <summary>
        /// 
        /// </summary>
        private readonly NLog.Logger _logger;
        /// <summary>
        /// Initializes a new instance of the <see cref="NLoggerWrapper"/> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <remarks></remarks>
        internal NLoggerWrapper(NLog.Logger logger)
        {
            _logger = logger;
        }

        /// <summary>
        /// Debugs the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Debug(string format, params object[] args)
        {
            _logger.Debug(format, args);
        }

        /// <summary>
        /// Debugs the exception.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="exception">The exception.</param>
        /// <remarks></remarks>
        public void DebugException(string message, Exception exception)
        {
            _logger.DebugException(message, exception);
        }

        /// <summary>
        /// Infoes the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Info(string format, params object[] args)
        {
            _logger.Info(format, args);
        }

        /// <summary>
        /// Traces the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Trace(string format, params object[] args)
        {
            _logger.Trace(format, args);
        }

        /// <summary>
        /// Warns the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Warn(string format, params object[] args)
        {
            _logger.Warn(format, args);
        }

        /// <summary>
        /// Errors the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Error(string format, params object[] args)
        {
            _logger.Error(format, args);
        }

        /// <summary>
        /// Fatals the specified format.
        /// </summary>
        /// <param name="format">The format.</param>
        /// <param name="args">The args.</param>
        /// <remarks></remarks>
        public void Fatal(string format, params object[] args)
        {
            _logger.Fatal(format, args);
        }
    }
}
